package com.zjc.service;

import com.zjc.Command;

/**
 * 具体命令角色类
 */
public class MyCommand implements Command {
    public MyCommand(){}
    //持有接收者的对象
    private Receiver receiver;
    public MyCommand(Receiver receiver){
        this.receiver=receiver;
    }
    public void exe() {
        receiver.action();
    }
}
